package com.itheim.neibulei5;

public class Test {
    public static void main(String[] args) {

        //实现接口 写没写   重写方法  干了  创建对象
        Inter inter = new Inter() {
            @Override
            public void sing() {
                System.out.println("哈哈哈");
            }
        };
        inter.sing();
        Inter inter2= new InterImpl();
        inter2.sing();

    }


}

interface  Inter{
    void  sing();
}
class InterImpl implements Inter{

    @Override
    public void sing() {
        System.out.println("sing");
    }
}
